home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1990-1992 Michael Davidson.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for any purpose and without fee is hereby
- * granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission
- * notice appear in supporting documentation.
- *
- * This software is provided "as is" without express or implied warranty.
- */
-
- #ifndef V86TYPES_H
- #define V86TYPES_H
-
- /*
- * typedefs for V86 mode data
- */
- typedef unsigned char byte_t; /* 8 bit byte */
- typedef unsigned short word_t; /* 16 bit word */
- typedef unsigned long dword_t; /* 32 bit double word */
- typedef unsigned long fptr_t; /* 32 bit real-mode far pointer */
-
- /*
- * macros for accessing byte and word data
- */
- #define BYTE(n, v) (((byte_t *)(&v))[n])
- #define WORD(n, v) (((word_t *)(&v))[n])
-
- /*
- * macros for accessing segment and offset of a far pointer
- */
- #define SEGMENT(f) WORD(1, f)
- #define OFFSET(f) WORD(0, f)
-
- #endif /* V86TYPES_H */
-